package com.pureut.order.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pureut.order.domain.SalesOrderDetail;
import com.pureut.order.dto.SalesOrderDetailDto;
import com.pureut.order.dto.SalesOrderDto;
import com.pureut.order.vo.BackDataVo;
import com.sale.common.mybatis.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/***
 * 销售订单明细mapper
 * Author:C
 * Date:2022/12/01 10:56
 * @DESC
 */
@Mapper
public interface SalesOrderDetailMapper extends BaseMapperPlus<SalesOrderDetailMapper, SalesOrderDetail, SalesOrderDetail> {

    /**
     * 获取明细列表
     */
    Page<SalesOrderDetailDto> getDetailList(@Param("page") Page<SalesOrderDetailDto> page, @Param("id") Long id);

    /**
     * 根据id获取明细
     */
    SalesOrderDetailDto getViewById(Long id);

    /**
     * 根据物料编码获取销售订单
     */
    List<SalesOrderDto> getOrderDocmentList(String materialCode);

    /**
     * 查询销售订单发货重量
     * @return
     */
    SalesOrderDetail selectShipping(BackDataVo backDataVo);
}
